﻿<Window x:Class="MARC.EHRS.VisualizationClient.Windows.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:controls="clr-namespace:MARC.EHRS.VisualizationClient.Controls;assembly=MARC.EHRS.VisualizationClient.Controls" 
    Title="MARC-HI Visualizer" Height="600" Width="800">
    
    <Grid Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="26"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="22"/>
        </Grid.RowDefinitions>
        <controls:Connect Visibility="Hidden" Name="connector" Grid.RowSpan="2" Grid.ColumnSpan="3" Grid.Row="0" Grid.Column="0" IsVisibleChanged="connector_IsVisibleChanged">
            <controls:Connect.Background>
                <SolidColorBrush Color="#AA000000"/>
            </controls:Connect.Background>
        </controls:Connect>
        <StatusBar Grid.Row="2" Name="sbMain" Background="Transparent">
            <StatusBarItem Name="statusText">Mohawk Visualizer 3.0</StatusBarItem>
        </StatusBar>
        <Menu Grid.Row="0" Name="mnuMain">
            <Menu.Background>
                <LinearGradientBrush>
                    <LinearGradientBrush.GradientStops>
                        <GradientStop Offset="0" Color="AliceBlue"/>
                        <GradientStop Offset="1" Color="White"/>
                    </LinearGradientBrush.GradientStops>
                </LinearGradientBrush>
            </Menu.Background>
            <MenuItem Header="Visualizer" Name="mnuFile">
                <MenuItem Header="Open Diagram..." Name="mnuOpen" Click="mnuOpen_Click" />
                <MenuItem Header="Connect..." Name="mnuConnect" Click="mnuConnect_Click" />
                <MenuItem Header="Exit" Name="mnuExit" />
            </MenuItem>
        </Menu>
        <Grid Grid.Row="1" Name="contentGrid">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="12"/>
                <ColumnDefinition Width="200"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="26"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <RepeatButton Grid.RowSpan="2" Grid.Column="1" Click="RepeatButton_Click" BorderThickness="0">
                <RepeatButton.Background>
                    <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                        <LinearGradientBrush.GradientStops>
                            <GradientStop Offset="0" Color="White"/>
                            <GradientStop Offset="1" Color="AliceBlue"/>
                            <GradientStop Offset="2" Color="White"/>
                        </LinearGradientBrush.GradientStops>
                    </LinearGradientBrush>
                </RepeatButton.Background>
                <Polygon Visibility="Visible" Name="polyImage" Points="0,0,5,5,0,10" Fill="#222222"/>
            </RepeatButton>
            <Border Grid.Column="0" Grid.RowSpan="2" CornerRadius="6" BorderThickness="2" SizeChanged="Border_SizeChanged">
                <Border.BorderBrush>
                    <RadialGradientBrush RadiusX="10" RadiusY="100">
                        <RadialGradientBrush.GradientStops>
                            <GradientStop Offset="0" Color="AliceBlue"/>
                            <GradientStop Offset="1" Color="AntiqueWhite"/>
                            <GradientStop Offset="2" Color="Gray"/>
                        </RadialGradientBrush.GradientStops>
                    </RadialGradientBrush>
                </Border.BorderBrush>
                <ContentPresenter Name="visualizerDiagram">
                    
                </ContentPresenter>
            </Border>
            <Label Content="Messages" Grid.Row="0" Grid.Column="2">
                <Label.Background>
                    <LinearGradientBrush>
                        <LinearGradientBrush.GradientStops>
                            <GradientStop Offset="0" Color="AliceBlue"/>
                            <GradientStop Offset="1" Color="White"/>
                        </LinearGradientBrush.GradientStops>
                    </LinearGradientBrush>
                </Label.Background>
            </Label>
            <Grid Grid.Row="1" Grid.Column="2">
                <Grid.RowDefinitions>
                    <RowDefinition Height="22"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border CornerRadius="6" BorderThickness="2">
                    <Border.BorderBrush>
                        <RadialGradientBrush>
                            <RadialGradientBrush.GradientStops>
                                <GradientStop Offset="0" Color="AliceBlue"/>
                                <GradientStop Offset="1" Color="Azure"/>
                            </RadialGradientBrush.GradientStops>
                        </RadialGradientBrush>
                    </Border.BorderBrush>
                    <StackPanel Orientation="Horizontal">
                        <ToggleButton Width="22" Name="btnServerDownload" IsChecked="True" Click="btnServerDownload_Click">
                            <ToggleButton.Background>
                                <LinearGradientBrush>
                                    <LinearGradientBrush.GradientStops>
                                        <GradientStop Offset="0" Color="Azure"/>
                                        <GradientStop Offset="1" Color="White"/>
                                    </LinearGradientBrush.GradientStops>
                                </LinearGradientBrush>
                            </ToggleButton.Background>
                            <ToggleButton.ToolTip>Toggles animation from server</ToggleButton.ToolTip>
                            <Polygon Points="0,5,5,8,5,0,8,0,8,8,13,5,7,12" Fill="Black"/>
                        </ToggleButton>
                        <Label Padding="5,0,5,0">Playback</Label>
                        <ToggleButton Width="22" IsEnabled="False" Name="btnReplay" Checked="btnReplay_Checked" Unchecked="btnReplay_Unchecked">
                            <ToggleButton.Background>
                                <LinearGradientBrush>
                                    <LinearGradientBrush.GradientStops>
                                        <GradientStop Offset="0" Color="Azure"/>
                                        <GradientStop Offset="1" Color="White"/>
                                    </LinearGradientBrush.GradientStops>
                                </LinearGradientBrush>
                            </ToggleButton.Background>
                            <ToggleButton.ToolTip>Start playing server content</ToggleButton.ToolTip>
                            <Polygon Points="0,0,5,5,0,10" Fill="Black"/>
                        </ToggleButton>
                        <Slider Name="sldSpeed"  Value="1000" Minimum="100" Maximum="1000" Width="80" IsEnabled="False" SmallChange="100" LargeChange="250" ValueChanged="sldSpeed_ValueChanged" />
                    </StackPanel>
                </Border>
                <ListBox Name="lstMessage" Grid.Row="1" IsSynchronizedWithCurrentItem="True" >
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="16"/>
                                    <RowDefinition Height="16"/>
                                </Grid.RowDefinitions>
                                <Label Padding="0" Grid.Row="0" Content="{Binding Name}"/>
                                <Label Padding="0" Grid.Row="1" Content="{Binding MachineOID}" FontStyle="Italic" Foreground="DarkOrchid">
                                    
                                </Label>
                            </Grid>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </Grid>
        </Grid>
    </Grid>
</Window>
